fix(core): P0a trust correctness (H13/H5/H3) for #8 - #9
Merged
Conversation
…tream caps Close Agent OS roadmap P0a items from #8: - H13: cancelled subagent/chain abort paths return non-ok; never promote worktrees unless outcome.ok and the cancel token is clear (single + parallel). - H5: write_file and bulk_write require a present string `content` key (explicit empty string still allowed); missing key leaves existing files. - H3: bound streamed tool-call index (<64) and total args bytes (8 MiB) on OpenAI, Anthropic, Codex, and Gemini stream paths; do not retry cap overflows.
17 tasks
Contributor
Author
|
No fix pushed — the three failing checks are pre-existing on PR #9 only changes
Fixing them here would be out-of-scope noise on a P0a trust PR; they need a separate master-side hygiene PR (rustfmt/gofmt + add the two events to Task list (1/3 completed)
|
karutoil
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Implements Milestone 1 / P0a from the Agent OS roadmap on #8: correctness fixes that unblock safe multi-agent work.
H13 — Cancel must not promote worktrees
subagent.rs(loop start, mid-batch tools, approval aborted, chain steps) now returnOutcome::errinstead ofOutcome::ok("[… aborted]").outcome.ok && !cancelso half-done trees never merge into main.H5 — No silent empty writes
write_fileand eachbulk_writeentry require a present stringcontentkey.""still allowed when the key exists; missing key leaves existing files unchanged.H3 — Bound streamed tool-call growth
index/ slot count at 64 and total args bytes at 8 MiB (providers/streaming.rshelpers).Test plan
cargo test --locked --no-default-features -- write_file_missing_content write_file_explicit_empty bulk_write_missing_content cancelled_subagent_outcome promote_gate_requires ensure_stream_tool_slot_rejects append_stream_tool_args_caps stream_tool_slot_helperslibcap-ng-dev) on PRCloses part of #8 (P0a slice).
openai-compatible/ck-grok-4.5| 𝕏